//导入mongoose包
const mongoose = require('mongoose')

//定义文档结构
const EventSchema = new mongoose.Schema({
    userId: String,
    title: String,
    detail: String,
    time: String
})

//创建users集合对象
const EventModel = mongoose.model('events', EventSchema)

//数据暴露
module.exports = EventModel